package main.Runnable;

import java.io.IOException;
import java.nio.file.FileVisitor;
import java.nio.file.Files;
import java.nio.file.Path;

public class RunCount implements Runnable {

    private Path path;
    private FileVisitor<Path> visitor;

    public RunCount(Path path, FileVisitor<Path> visitor) {
        this.path = path;
        this.visitor = visitor;
    }

    @Override
    public void run() {
        try {
            Files.walkFileTree(path, visitor);
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}
